package com.inibb.app.util.mail;

import org.springframework.integration.core.Message;
import org.springframework.integration.core.MessagingException;
import org.springframework.integration.message.ErrorMessage;

public class ErrorUnwrapper {

	public Message<?> transform(ErrorMessage errorMessage) {
		MessagingException msgException = (MessagingException) errorMessage.getPayload();
		return msgException.getFailedMessage();
	}
}
